<!-- 客户消息 -->
<script lang="ts" setup>
import { ref } from 'vue'

const tasks = ref([
  {
    user: {
      name: 'xxx',
      gender: '女士',
      contact: '',
      avatar: 'path/to/avatar'
    },
    description: '你好，我需要贵公司设计一款PC端网页。'
  },
  {
    user: {
      name: 'xxx',
      gender: '女士',
      contact: '',
      avatar: 'path/to/avatar'
    },
    description: '你好，我需要贵公司设计一款PC端网页。'
  },
  {
    user: {
      name: 'xxx',
      gender: '女士',
      contact: '',
      avatar: 'path/to/avatar'
    },
    description: '你好，我需要贵公司设计一款PC端网页。'
  }
  // ...其他任务数据
])
</script>

<template>
  <page-container title="客户消息">
    <el-tabs type="border-card">
      <el-tab-pane label="待处理">
        <div v-for="(task, index) in tasks" :key="index" class="task-item">
          <div class="user-info">
            <div class="user">
              <el-avatar :src="task.user.avatar" :size="70"></el-avatar>
              <div>用户名：{{ task.user.name }} ({{ task.user.gender }})</div>
              <div>联系方式: {{ task.user.contact }}</div>
            </div>
            <div class="text">
              <div class="lr">
                {{ task.description }}
              </div>
              <div class="btn">
                <el-button type="primary">合作</el-button
                ><el-button type="success">合作完成</el-button
                ><el-button type="danger">合作失败</el-button>
              </div>
            </div>
          </div>
        </div>
      </el-tab-pane>
      <el-tab-pane label="合作中">Config</el-tab-pane>
      <el-tab-pane label="合作完成">Role</el-tab-pane>
      <el-tab-pane label="合作失败">Task</el-tab-pane>
    </el-tabs>
  </page-container>
</template>

<style lang="scss" scoped>
.task-item {
  width: 977px;
  height: 186px;
  margin-bottom: 10px;
  overflow: hidden;
  .user {
    width: 213px;
    height: 183px;
    margin-top: 30px;
    margin-left: 10px;
    float: left;
  }
  .text {
    position: relative;
    width: 750px;
    height: 183px;
    background-color: #e8e8e8;
    float: left;
    .btn {
      position: absolute;
      right: 0px;
      bottom: 0px;
    }
  }
}
</style>
